""" DigitalICS: mobile data collection tool to complete surveys with integrated multimedia

    Copyright (C) 2009. Yael Schwartzman  

    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with this program.  If not, see <http://www.gnu.org/licenses/>
    
    Contact information: Yael Schwartzman -  yaelsf@gmail.com
    """
class Prompt:
    """ Prompt model"""
    def __init__(self,id , data ,label = None,input_type = None, 
                 default = None,hint = None,options = None, return_type= None,
                 relevance= None, module= None,method = None,media_file= None, 
                 audio= None,repeat= None,output= None,
                 breach = None,special_breach = None):
        
        
        self.id = id # This is used for relevance 
        self.data = data # Name of the variable where the data for this prompt will be stored
        self.input_type = input_type # a constant that determines the type of input required
        self.return_type= return_type # if there are various return types for this input type (see constants)
        self.options = options # if multiple choice, this is a list of options
        self.default = default # what is the default value for this input
        self.hint  =hint #not used yet
        self.label = label #what should be prompted to the user
        self.relevance = relevance #state the id of the question and the value of the data required for this question to be prompted
        self.module = module #if this prompt opens a new form.
        self.method = method # if this prompt requires db accesss
        self.media_file = media_file #name of the multimedia destination file in case this is prompt takes a picture or audio
        self.audio = audio #audio that gets played during question
        self.repeat = repeat #currently not in use. It should hold the id of the question that is going to dictate how many times this question will be prompted, an integer number or a list
        self.output = output #What is going to be printed along with the answer. #VAR is replaced with answer, #label is replaced by the prompt's label
        self.breach = breach #it's a dicitionary: what answer value constitutes a breach of standard and should be highlighted
        self.special_breach = special_breach #not used
        #print " method = %s self.method = %s" % (method,self.method)
        
    def get_module(self):
        return self.module
    
    def get_method(self):
        return self.method
    
    def get_default(self):
        return self.default
        
    def get_input_type(self):
        return self.input_type
    
    def get_return_type(self):
        return self.return_type
    
    def get_audio(self):
        return self.audio
    
    def get_media_file(self):
        return self.media_file
    
    def get_label(self):
        return self.label
    
    def get_data(self):
        return self.data

    def get_options(self):
        return self.options
    
    def get_relevance(self):
        return self.relevance 
          

    def get_repeat(self):
        return self.repeat
    
    def get_id(self):
        return self.id
    
    def get_output(self):
        return self.output
    
    def get_breach(self):
        return self.breach
    
    def set_id(self,id):
        self.id = id
        
    def set_label(self,label):
        self.label = label
    
    def set_data(self,data):
        self.data = data
    
    def set_media_file(self,media_file):
        self.media_file = media_file
        
    def unset_repeat(self):
        self.repeat = None
        
        